﻿using System;

namespace Entities
{
    [Serializable]
    public class tblProductOption
    {
        private int product_id;
        private string product_option_des;

        public tblProductOption() {}

        public tblProductOption(int product_id, string product_option_des)
        {
            this.product_id = product_id;
            this.product_option_des = product_option_des;
        }

        public int productID
        {
            get { return this.product_id; }
            set
            {
                if (value == null)
                    throw new Exception("Mă sản phẩm không được để trống!");
                this.product_id = value;
            }
        }

        public string productOptionDes
        {
            get { return this.product_option_des; }
            set
            {
                this.product_option_des = value;
            }
        }

        public override string ToString()
        {
            return this.product_option_des + "; " + this.product_id + "; ";
	    }
	    public override bool Equals(Object obj)
	    {
            tblProductOption me = (tblProductOption)obj;
            bool ret = this.productOptionDes.Equals(me.productOptionDes);
	        return ret;
	    }
	    public override int GetHashCode()
	    {
            return this.productOptionDes.GetHashCode();
	    }

    }
}
